<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<html>
<head>
    <title>用户信息</title>
</head>
<body>
<%--${users}--%>
<!--
相当于
for(User user :users) {
}
-->
<%--<c:forEach var="user" items="${users}">--%>
<%--    ${user.username}----${user.password}----${user.nickname} <br>--%>
<%--</c:forEach>--%>
<%--<h1><%=request.getParameter("name")%></h1>--%>

<h1>${param.username}</h1>
<jsp:include page="/common/title.jsp"/>
<jsp:include page="inc/user_top.jsp"/>
<table width="1000" border="1" align="center">
    <tr>
        <td>用户名</td>
        <td>用户密码</td>
        <td>用户昵称</td>
        <td>操作</td>
    </tr>
    <c:forEach items="${users}" var="user">
        <tr>
            <td>${user.username}</td>
            <td>${user.password}</td>
            <td>${user.nickname}</td>
            <td>
                <c:if test="${user.username!='admin'}">
                    <a href="#">删除</a> &nbsp;
                    <a href="#?name=${user.username}">更新</a>
                </c:if>
                <c:if test="${user.username=='admin'}">
                    管理员
                </c:if>
            </td>
        </tr>
    </c:forEach>
</table>
</body>
</html>
